<?php
	session_start();
	if(isset($_REQUEST['masp'])&& isset($_REQUEST['nd']))
	{
		$masp=$_REQUEST['masp'];
		$nd=$_REQUEST['nd'];
		require("../DAO/DataHelper.php");
		//require("../DAO/BinhLuanSuKienDTO.php");
		require("../DAO/SanPhamDAO.php");
		if(isset($_SESSION['IsLogin'])&& isset($_SESSION['UserName']))
		{
			$username=$_SESSION['UserName'];
			$NgayTao=date("Y/m/d");
			$tongsao=0;
			
			if(SanPhamDAO::ThemBinhLuanSanPham($masp,$username,$nd,$NgayTao,$tongsao))
			{
				echo($masp);
			}
			else
			{
				echo("false");
			}
		}
		else
		{
			echo("false");
		}
		
	}
?>